package com.dynaBlaster.elements;

import com.dynaBlaster.R;
import com.dynaBlaster.core.Point;
import com.dynaBlaster.game.Game;
import com.dynaBlaster.game.GameConfig;
import com.dynaBlaster.view.GameView;

import android.content.res.Resources;
import android.graphics.drawable.Drawable;

public class MonsterGlut extends Creature {

	public MonsterGlut(Game game) {
		super(game);

		IS_FLYING = true;
		IS_PASSING_CREATURES = true;



	}

	@Override
	public void move() {

		if (game.random.nextInt(GameConfig.MONSTER_GLUT_TURN_PROB_FACTOR) == 0 && isOnFieldMiddle()) {
			moveInRandomFreeDirection();
			return;
		}

		Point next = nextAfterMove();
		if (next != null)
			this.pos = next;
		else {
			if (moveInRandomFreeDirection()) {
				// well, it moved
				return;
			} else
				// blocked... stands still
				return;
		}

	}

}
